<template>
	<view>
		<web-view :webview-styles="webviewStyles" :src="url"></web-view>
	</view>
</template>

<script>
export default {
    components: {},
		data() {
			return {
				url: '',
				webviewStyles: {
					// 设置跳转加载进度颜色
					progress: {
						color: '#55ffff'
					}
				}
			}
		},
		onLoad() {
			this.setURL()
		},
		methods: {
			setURL(){
				// 采用登录的信息
				// const Openid = '450205194906020011';
				// const id = '4028808d7fb578d6017fba29871130c0';
				//采用从id的接口获取到所以数据
				const Openid = uni.getStorageSync('idCard');
				const id = uni.getStorageSync('id');
				// console.log('家属的Openid: '+Openid);
				// console.log('这个id是：'+id);
				const idToken = uni.getStorageSync('idToken');
				const url = `http://120.78.172.10/h5/?id=${id}&pid=${Openid}&accessToken=${idToken}`;
				this.url = url;
			}
			// setTimeout(()=>{
			// uni.setNavigationBarTitle({
			// title:‘app中要设置的标题’
			// })
			// },2000)
		}
	}
</script>

<style>
</style>
